08dc1ba5e32e64603fdd6c0012529311a691cfd7
[git-annex.git] /
1 [[!comment format=mdwn
2  username="joey"
3  subject="""comment 6"""
4  date="2022-01-07T16:12:20Z"
5  content="""
6 Current thinking on deleting corrupted tmp files: If a download succeeds,
7 and verification then fails, the whole file content has been downloaded,
8 and is corrupt. So it would be ok to always delete it then, as far as p2p
9 transfers goes.
10
11 For other remotes, the same is often true. The only exceptions are like
12 rsync and bittorrent, which can recover from corruption on retry. But,
13 I don't think either rsync or bittorrent will usually write corrupt data
14 to a file anyway. They would catch over-the-wire corruption with rolling
15 checksums etc. So, it seems like a verification should never fail after
16 a successful rsync or bittorrent download. Unless the disk corrupted the
17 data in the meantime. Which is an unlikely situation, and not one that it's
18 really necessary for git-annex to recover from with optimal efficiency.
19
20 ... Oh interesting.. It already is supposed to do that, in
21 getViaTmpFromDisk. It seems, what is happening is the transfer fails
22 when all the file content is present, and so it never gets to the point of
23 verifying it, let alone deleting it.
24 """]]